/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Máté
 */
public class ScopeWatch {   //oszcilloszkopokat kezelo osztaly

    private static List<Oscilloscope> oscilloscopes;    //oszc. listaja

    static {
        oscilloscopes = new ArrayList<Oscilloscope>();
    }

    public static void addOscilloscope(Oscilloscope oscilloscope) {
        oscilloscopes.add(oscilloscope);    //oszc. hozzadasa
    }

    public static void newOscilloscope() {
        oscilloscopes = new ArrayList<Oscilloscope>();
    }

    public static void runOscilloscope() {
        for (Oscilloscope oscilloscope : oscilloscopes) {
            oscilloscope.readSignal();  // itt minden oszc.-pal beolvastatjuk a wire-je értékét
        }
    }
}
